<template>
  <div class="search-container-item">
    <span v-if="name" class="item-name">{{ name }}：</span>
    <el-input
      @input="
        (e) => {
          $emit('input', e);
        }
      "
      style="width: 110px"
      size="mini"
      :value="value"
    ></el-input>
    <span v-if="endText" style="margin-left: 5px;" class="item-name">{{
      endText
    }}</span>
  </div>
</template>

<script>
export default {
  name: "InputItem",
  props: {
    name: String,
    value: String,
    endText: String,
  },
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.search-container-item {
  margin-right: 20px;
}

.item-name {
  color: #004ca7;
}
</style>
